<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*,com.yh.bean.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
欢迎来到云和数据!
<%

Map map=(Map)request.getAttribute("map");
List<user> newsList=(List<user>)map.get("newsList");
out.println("<table><tr><td>用户名</td><td>性别</td><td>生日</td><td>家庭住址</td></tr>");
for(user use:newsList){
	out.write("<tr><td>"+use.getUsername()+"</td><td>"+use.getSex()+"</td><td>"+use.getBirth_day()+"</td><td>"+use.getAddress()+"</td></tr>");
}
out.println("</table>");
PageBean pb=(PageBean)map.get("pageBean");
%>
<a href="textServlet2?currenPage=1">首页</a>
<%
if(pb.getCurrentPage()!=1){
	%>
<a href="textServlet2?currenPage=<%=pb.getCurrentPage()-1%>">上一页</a>

<%
}
%>
<%
if(pb.getCurrentPage()!=pb.getTotalPage()){
	%>
	
	<a href="textServlet2?currenPage=<%=pb.getCurrentPage()+1%>">下一页</a>
	<%
}
%>

<a href="textServlet2?currenPage=<%=pb.getTotalPage() %>">末页</a>

</body>
</html>